package com.zmj.framework.common;

/**
 * 通用常量
 * @author scy
 */
public interface CommonConstant {
    //机构预生产编号数
    int PREPARE_SERIAL_NUMBER = 20;

    int PW_ENCORDER_SALT = 12;

    String YES = "1";
    String NO = "0";

    String TRUE = "Y";
    String FLASE = "N";

    String RULE_STATUS_ACTIVE = "1";//规则状态--激活
    String RULE_STATUS_INVALID = "0";//规则状态--未激活

    //用户密码编辑是否密文传输
    boolean PWD_EDIT_SECRET_TRANSFER = false;

    //历史密码1新增 2修改 3重置
    String HP_TYPE_ADD = "1";
    String HP_TYPE_EDIT = "2";
    String HP_TYPE_RESET = "3";

    //用户状态 1激活 0注销
    String USER_STATUS_ACTIVE = "1";
    String USER_STATUS_INVALID = "0";
    String USER_STATUS_LOCKED = "2";

    //用户登录锁定 0未锁 1锁
    String USER_LOGIN_STATUS_UNLOCKED = "0";
    String USER_LOGIN_STATUS_LOCKED = "1";

    //客户端状态 1启用 0未启用
    String OAUTH_CLIENT_STATUS_ACTIVE = "1";
    String OAUTH_CLIENT_STATUS_INVALID = "0";

    int CLIENT_LENGTH = 2;

    //资源类型  api  function  rule
    String API_TYPE = "api";
    String FUNCTION_TYPE = "function";
    String RULE_TYPE = "rule";

    //菜单根的值
    String ROOT_FUNCTION = "0";
    String ROOT = "0";
    String ROOT_ORG = "0";
    //菜单类型 0菜单 1按钮权限
    String FUNCTION_TYPE_MENU = "0";
    String FUNCTION_TYPE_API = "1";

    String CONTEXT_KEY_USER_TOKEN = "context_key_user_token";
    String CONTEXT_KEY_USER = "context_key_user";

    // 密码模式
    String PASSWORD_MODE_ASSIGN = "1";
    String PASSWORD_MODE_RANDOM = "2";

    // 通知方式
    String NOTIFY_MODE_NO = "0";
    String NOTIFY_MODE_SMS = "1";

    //数据规则类型
    String ALL_TYPE = "all";
    String SUB_TYPE = "sub";
    String CURRENT_TYPE = "current";
    String CUSTOM_TYPE = "custom";

    // 管理员角色
    String ROLE_ADMIN = "admin";

    // 应用权限类型
    String PERMISSION_TYPE_INTERFACE = "interface";
    String PERMISSION_TYPE_DATA = "data";
    String PERMISSION_TYPE_MENU = "menu";

    // 机构类型编码类型
    String ORG_TYPE_SEQUENCE = "sequence"; // 数字编码
    String ORG_TYPE_CONSUMER = "consumer"; // 自定义
}
